<?php
define("INSTALL",true);
require_once("bootstrap.php");
function install_safe_harbour() {
$page = array();
$page['title'] = "";
$page['body'] = "";
	if (isset($_GET['stage'])) {
		$stage = GetParam("stage","text","GET");
	} else {
		$stage = "default";
	}	
		switch ($stage) {
		default:
		case "requirements-check":
			$page['title'] = "Check safe-harbour Requirements";
			$page['body'] = "<p>This page will be the requirements checking page for safe-harbour.</p>\n";
		break;
		case "database-settings":
			$page['title'] = "Enter Database Settings";
			$page['body'] = "<p>You will be able to enter your default database configuration here.</p>\n";
		break;
		case "install":
			$page['title'] = "Installing safe-harbour database";
			$page['body'] = "<p>This page will simply redirect to stage=complete once the database is installed. Alternatively, if the installation failed we will be returned to the database settings entry page</p>\n";
		break;
		case "complete":
			$page['title'] = "safe-harbour successfully installed";
			$page['body'] = "<p>You have installed safe-harbour <a href='/?'>Click here</a> to login to your installation.</p>\n";
		break;
		}//switch
	return $page;
}
$page = install_safe_harbour();
print "<h2>".$page['title']."</h2>\n";
print $page['body'];
?>
